package sebastiankerckhof.helper.sampler;

import sebastiankerckhof.math.Point2f;

public class JitterSampler extends AbstractSampler{

	public JitterSampler(int num_samples){
		super(num_samples);
		generate_samples();	
	}
	
  public void generate_samples() {
          int n = (int) Math.sqrt(num_samples);
  
          for (int p = 0; p < num_sets; p++)
                  for (int j = 0; j < n; j++)
                          for (int k = 0; k < n; k++)
                          {
                                  Point2f sp = new Point2f((k + (float)Math.random()) / n, (j + (float)Math.random()) / n);
                                  samples.add(sp);
                          }
  }

	@Override
  public void shuffle_samples() {
	  // TODO Auto-generated method stub
	  
  }

	@Override
  public int get_num_samples() {
	  // TODO Auto-generated method stub
	  return 0;
  }
}
